package com.sc.test;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.sc.test.recyclerview2.DragRvActivity;
import com.sc.test.recyclerview2.GridRvActivity;
import com.sc.test.recyclerview2.LinearRvActivity;
import com.sc.test.recyclerview2.StaggeredRvActivity;
import com.sc.test.recyclerview2.SwipeToDismissActivity;
import com.sc.test.utils.Util;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Shen Chao on 2018-01-13-013 下午 14:45.
 */

public class RecyclerMainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rv_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.to_linear_rv_page_btn, R.id.to_grid_rv_page_btn, R.id.to_staggered_rv_page_btn,
            R.id.to_swipe_rv_page_btn, R.id.to_drag_rv_page_btn})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.to_linear_rv_page_btn:
                Util.openNewActivity(this, LinearRvActivity.class, "");
                break;
            case R.id.to_grid_rv_page_btn:
                Util.openNewActivity(this, GridRvActivity.class, "");
                break;
            case R.id.to_staggered_rv_page_btn:
                Util.openNewActivity(this, StaggeredRvActivity.class, "");
                break;
            case R.id.to_swipe_rv_page_btn:
                Util.openNewActivity(this, SwipeToDismissActivity.class, "");
                break;
            case R.id.to_drag_rv_page_btn:
                Util.openNewActivity(this, DragRvActivity.class, "");
                break;
        }
    }
}
